<?php 
    $cuser = $session->read('User');
    $controller = $this->name;
    $actions = $this->action; 
    $objmenu = $action->getnavigation($controller,$actions);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php $path=Router::url(array('controller' => '/', 'action' =>''), true);?>
<link rel="bookmark" type="image/x-icon" href="<?php echo $path;?>favicon.ico"/> 
<link rel="shortcut icon" href="<?php echo $path;?>favicon.ico"/>
<link rel="icon" type="image/x-png" href="<?php echo $path;?>favicon.png"/>
<?php echo $html->charset('utf-8') ?>
<?php echo $html->css('common.css'); ?>
<?php echo $javascript->link('jquery-1.6.2.js');?>
<?php echo $javascript->link('app.js');?>
<?php echo $javascript->link('message.js');?>
<title>
常熟领军人才
</title>
<script>
$(function(){
    var _wrap=$('ul.line');//定义滚动区域
    var _interval=3000;//定义滚动间隙时间
    var _moving;//需要清除的动画
    _wrap.hover(function(){
        clearInterval(_moving);//当鼠标在滚动区域中时,停止滚动
    },function(){
        _moving=setInterval(function(){
            var _field=_wrap.find('li:first');//此变量不可放置于函数起始处,li:first取值是变化的
            var _h=_field.height();//取得每次滚动高度(多行滚动情况下,此变量不可置于开始处,否则会有间隔时长延时)
            _field.animate({marginTop:-_h+'px'},600,function(){//通过取负margin值,隐藏第一行
                _field.css('marginTop',0).appendTo(_wrap);//隐藏后,将该行的margin值置零,并插入到最后,实现无缝滚动
            })
        },_interval)//滚动间隔时间取决于_interval
    }).trigger('mouseleave');//函数载入时,模拟执行mouseleave,即自动滚动
});
</script>
</head>
<body>
<?php echo $this->element('judgeexplorer');?>
<div style="display:none">
<?php echo $html->link("url","/",array("id"=>"getpath"))?>
</div>
    <div class="whole_page" style='height:92%'>
        <!-- header -->
        <div class="head_bg">
            <div class="head_content">
                <div class="h_c_left_bg left"></div>
                <div class="h_c_center_bg left">
                    <div class="logo_nav_area">
                        <div class="custp_logo left"><a href="<?php echo $path.'projects/index'; ?>"><?php echo $html->image('logo.png')?></a></div>
                        <div class="custp_site_info">
                            <div class="login_user_info">
                                <div class="left head_title">网上管理平台</div>
                                <?php if($cuser):?>
                                    <div class="left user_welcome">欢迎&nbsp;
                                        <span>
											<?php if($cuser['cid']==""){
                                        	echo $html->link($cuser['name'],"/users/view/".$cuser['id']);
                                        	}else{echo $cuser['name'];} ?>
										</span>
                                    </div>
                                
                                <div id="addmessage" class="info_alert left"><?php $session->flash() ;?></div>
                                <div class="right user_welcome_logout">
                                    <div class="left top_menu_btn">
                                        <div class="left header_alert left">
                                            <div class="h_alert_n">
                                                <?php 
                                                    $urlpath= $path."msgs/index";
                                                    echo '<a title="站内信" href="'.$urlpath.'">';
                                                ?>
                                                    <div class="notification_icon left"></div>
                                                    <div id="p_m_alert_list" class="left">
                                                        <div id="p_m_l">
                                                            <div class="notification_num left" id="p_m_alert"></div>
                                                        </div>
                                                    </div>
                                                    <div class="clear"></div>
                                                </a>
                                            </div>
                                        </div>
                                        <div class="clear"></div>
                                    </div>

                         
                                    <div class="left user_logout"><?php echo $html->link(__('Exit',true), '/users/logout');?></div>
                                </div>
                                <?php endif;?>
                                <div class='right' id='demo'>
                                <div class="notice_icon"></div>
                                <ul class='line'>
                                     <?php foreach($notices as $notice):?>
                                    <li>
                                   		<a  title="<?php echo $notice['Notice']['title'];?>" href='<?php echo $path.'notices/visit_view/'.$notice['Notice']['id']?>'>
                                    		<?php echo $str->sub_len($notice['Notice']['title'],15);?>
                                    	</a>
                                    </li>
                                    <?php endforeach;?>
                                    </ul>
                                </div>
                                <div class="clear"></div>
                            </div>
                            <?php if($actions == 'visit_index'):?>
                            <a href='javascript:;' style='font-size:9pt;padding:3px 0;'>公告列表</a>
                            <a style='font-size:9pt;padding:3px 0;'>&nbsp;</a>
                            <?php elseif($actions == 'visit_view'):?>
                            <a href='<?php echo $path."notices/visit_index";?>' style='font-size:9pt;padding:3px 0;'>公告列表</a>
                            <a ><?php echo $html->image('arrow.png',array('align'=>'absmiddle'));?></a>
                            <a style='font-size:9pt;padding:3px 0;'>公告详情</a>
                            <?php endif;?>
                            <div class="site_map"></div>
                        </div>
                    </div>
                </div>
                <div class="h_c_right_bg left"></div>
                <div class="clear"></div>
            </div>
        </div>
        <!-- middle content -->
        <div class="app_content" style='margin:0 auto;'>
            <!-- login box -->
            <div class="" style='width:80%;margin:0 auto;'>
                         <?php echo $content_for_layout; ?>
                    <div class="clear"></div>
                </div>

            </div>
        </div>
    </div>
    <!-- footer -->
    <div class="footer_nav_bar left" style='width:100%;margin-top:0px;'>
        <div class="footer_c_area">
        <?php if(!$cuser):?>
        	<div style="width:100%;">
            <?php echo $this->element('footer');?>
            </div>
        <?php else:?>
                <?php 
                //如果是企业
                    if($cuser['cid'] || @$cuser['cgid']){
                  ?>
                  <div style="width:100%;">
                  <?php 
                        echo $this->element('footer');
                   ?>
                  </div>
                  <?php    
                       
                    }else{
                ?>
                <ul>
                    <?php 
                    $pselected="";
                    $cselected="";
                    $sselected="";
                    $rselected="";
                    $gselected="";
                    $collselected = "";
                    if($controller == 'Projects'){ 
                        $pselected="selected";
                    }
                    else if($controller == 'Companys'){ 
                        $cselected="selected";
                    }else if($controller == 'Searchs'){ 
                        $sselected="selected";
                    }else if($controller == 'Reports'){ 
                        $rselected="selected";
                    }else if($controller == 'Colleages'){ 
                        $collselected="selected";
                    }else if($controller == 'Types' || $controller == 'Users' || $controller == 'Groups'){
                        $gselected="selected";
                    }
                    
                    $projectpath="/projects/index";
                    $companypath="/companys/index";
                    $searchpath="/searchs/index";
                    $reportpath="/reports/allindustry";
                    $colleagepath="/colleages/index";
                    $grouppath="/users/index";
                    $emptypath="javascript:void(0)";
                    if($cuser['cid'] || @$cuser['cgid']){
                        $projectpath=$emptypath;
                        $companypath=$emptypath;
                        $searchpath=$emptypath;
                        $grouppath=$emptypath;
                        $reportpath=$emptypath;
                        $colleagepath=$emptypath;
                        $cssnone="display";
                        $pselected=$sselected=
                        $rselected=$gselected=
                        $collselected=$cselected=$cssnone;
                    }
                    ?>
                    <?php 
                   // $flag=$action->checkPermissions($cuser,"add");
                    
                    //if($flag){?>
                    <!-- <li class="<?php echo $pselected?>"><?php echo $html->link('<span class="bottom_bar_item_intro_icon"></span><span class="bottom_icon_title">'.__("projects",true).'</span>',$projectpath,array('escape' => false))?></li> -->
                    <?php //}?>
                    
                    <li class="<?php echo $cselected?>"><?php echo $html->link('<span class="bottom_bar_item_data_icon"></span><span class="bottom_icon_title">'.__("companys",true).'</span>',$companypath,array('escape' => false))?></li>
                    <li class="<?php echo $sselected?>"><?php echo $html->link('<span class="bottom_bar_item_screen_icon"></span><span class="bottom_icon_title">'.__("searchs",true).'</span>',$searchpath,array('escape' => false))?></li>
                    <li class="<?php echo $rselected?>"><?php echo $html->link('<span class="bottom_bar_report_center_icon"></span><span class="bottom_icon_title">'.__("reports",true).'</span>',$reportpath,array('escape' => false))?></li>
                    <li class="display"><?php echo $html->link('<span class="bottom_bar_tech_trans_icon"></span><span class="bottom_icon_title">'.__("colleages",true).'</span>',$colleagepath,array('escape' => false))?></li>
                    <?php // if($cuser['isadmin']=='1'){
                       
?>
 <li class="<?php echo $gselected?>"><?php echo $html->link('<span class="bottom_bar_settings_icon"></span><span class="bottom_icon_title">'.__("users",true).'</span>',$grouppath,array('escape' => false))?></li>   
<?php
                        
                    //}?>
                   
                </ul><div class="clear"></div>
                <?php }?>			
        <?php endif;?>
        </div>
    </div>
    

</body>
</html>
<script>
messagefadeout();
</script>